package org.zoomdev.zoom.dao;

import org.zoomdev.zoom.common.expression.Symbol;

import java.util.Collection;

class SelectImpl implements Select<Select> {

    private final StringBuilder sb = new StringBuilder();
    private final String select;
    private String table;
    private int limit;
    private int position;

    public SelectImpl(String select) {
        this.select = select;
    }

    @Override
    public Select select(String select) {
        return null;
    }

    @Override
    public Select from(String table) {
        this.table = table;
        return this;
    }

    @Override
    public Select limit(int limit) {
        return limit(0, limit);
    }

    @Override
    public Select limit(int position, int limit) {
        this.position = position;
        this.limit = limit;
        return this;
    }

    @Override
    public Select orderBy(String key, Sort sort) {
        return this;
    }

    @Override
    public Select groupBy(String key) {
        return this;
    }

    @Override
    public Select having(String key, Symbol symbol, Object value) {
        return this;
    }

    @Override
    public Select join(String table, String on) {
        return this;
    }


    @Override
    public Select join(String table, String on, JoinType type) {
        return this;
    }

    @Override
    public Select union(Select select) {
        return this;
    }

    @Override
    public Select unionAll(Select select) {
        return this;
    }

    @Override
    public Select where(String key, Object value) {
        return this;
    }

    @Override
    public Select where(String key, Symbol symbol, Object value) {
        return this;
    }

    @Override
    public Select where(Condition condition) {
        return this;
    }

    @Override
    public <E> Select whereIn(String key, Iterable<E> values) {
        return this;
    }

    @Override
    public Select where(String key) {
        return this;
    }

    @Override
    public <E> Select whereIn(String key, Collection<E> values) {
        return this;
    }

    @Override
    public <E> Select whereIn(String key, Select select) {
        return this;
    }

    @Override
    public Select whereNotNull(String key) {
        return this;
    }

    @Override
    public Select whereNull(String key) {
        return this;
    }

    @Override
    public Select like(String key, Like like, Object value) {
        return this;
    }

    @Override
    public Select orWhere(Condition condition) {
        condition.where(this);
        return this;
    }

    @Override
    public Select orWhere(String key, Object value) {
        return this;
    }

    @Override
    public Select orLike(String key, Like like, Object value) {
        return this;
    }

    @Override
    public Select exists(Select select) {
        return this;
    }
}
